﻿using System;

namespace EventLogAnalyzer.Model
{
    public class CommonEvent : BusinessModelBase
    {

        public CommonEvent()
        {
            Id = _counter++;
        }

        public int _numberOfOccurances;
        public int NumberOfOccurances
        {
            get { return _numberOfOccurances; }
            set
            {
                if (_numberOfOccurances != value)
                {
                    _numberOfOccurances = value;
                    OnPropertyChanged("NumberOfOccurances");
                }
            }
        }

        public string _eventTitle;
        public string EventTitle
        {
            get { return _eventTitle; }
            set
            {
                if (_eventTitle != value)
                {
                    _eventTitle = value;
                    OnPropertyChanged("EventTitle");
                }
            }
        }

        public string _eventDescription;
        public string EventDescription 
        {
            get { return _eventDescription; }
            set
            {
                if (_eventDescription != value)
                {
                    _eventDescription = value;
                    OnPropertyChanged("EventDescription");
                }
            }
        }

        public string _commonPart;

        public string CommonPart 
        {
            get { return _commonPart; }
            set
            {
                if (_commonPart != value)
                {
                    _commonPart = value;
                    OnPropertyChanged("CommonPart");
                }
            }
        }

        private static int _counter = 1;
        public int Id{ get; private set; }
    }
}